package com.ican;

import com.facebook.react.ReactActivity;
import android.os.Bundle;
import org.devio.rn.splashscreen.SplashScreen;
import android.view.WindowManager;
import android.os.Build;
public class MainActivity extends ReactActivity {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  // @Override
  // public void onActivityResult(int requestCode, int resultCode, Intent data){
  //   super.onActivityResult(requestCode, resultCode, data);
  //   mReactInstanceManager.onActivityResult(requestCode, resultCode, data);
  // }

  @Override
      protected void onCreate(Bundle savedInstanceState) {
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
              WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
              layoutParams.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
              getWindow().setAttributes(layoutParams);
              getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
              getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
          }
  
          super.onCreate(savedInstanceState);
     }

  // @Override
  // protected void onCreate(Bundle savedInstanceState) 	  {
  //   SplashScreen.show(this);  // here
  //   super.onCreate(savedInstanceState);
  // }
  
  @Override
  protected String getMainComponentName() {
    return "ican";
  }
}
